package com.wushi.lenovo.asia5b.app_ui.other.dialog;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import com.mvp.base.BaseDialog;
import com.wushi.lenovo.asia5b.R;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by zhangyuncai on 2018/12/8.
 */
public class SendEmailDialog extends BaseDialog implements View.OnClickListener {
    String email;
    @BindView(R.id.iv_sendemail_ok)
    ImageView iv_sendemail_ok;
    @BindView(R.id.et_sendemail_email)
    EditText et_sendemail_email;
    @BindView(R.id.bt_sendemail_ok)
    Button bt_sendemail_ok;

    public SendEmailDialog(Context context, String email) {
        super(context);
        this.email = email;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_sendemail;
    }

    @Override
    protected void initView() {
        et_sendemail_email.setText(email + "");
    }

    @Override
    protected void initListener() {

    }

    @OnClick({R.id.iv_sendemail_ok, R.id.bt_sendemail_ok})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_sendemail_ok:
            case R.id.iv_sendemail_ok:
                dismiss();
                break;
        }

    }

    @Override
    protected int getGravity() {
        return Gravity.CENTER;
    }

    @Override
    protected int getWidthStyle() {
        return getScreenWidth(0.8f);
    }
}
